<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/layuimini/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/layuimini/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }

    </style>
</head>
<body>
<form id="userForm" lay-filter="userForm">
<div class="layui-form layuimini-form" lay-filter="add_ncc">

    <div class="layui-form-item">
        <label class="layui-form-label required ">ID</label>
        <div class="layui-input-block">
            <input type="text" name="id" id="id" readOnly="true" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" id="name" value="" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">告警组</label>
        <div  id="linkgroup_id" name="linkgroup_id" class="layui-input-block"></div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">告警方式</label>
        <div  id="alert_type" name="alert_type" class="layui-input-block"></div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">自愈状态</label>
        <div  id="auto_status" name="auto_status" class="layui-input-block"></div>
    </div>

</div>
</form>

<script src="/static/layuimini/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/layui/sm_select/xm-select.js"></script>

<script>

    layui.use(['form','laydate'],function () {
        window.form = layui.form;
        form.render();
    });

    var linkgroupid = xmSelect.render({
                el: '#linkgroup_id',
                name: 'linkgroup_id',
                filterable: true,
                radio: true,
                data: []
            });



    var alerttype = xmSelect.render({
                el: '#alert_type',
                name: 'alert_type',
                filterable: true,
                radio: true,
                data: []
            });

    var astatus = xmSelect.render({
                el: '#auto_status',
                name: 'auto_status',
                filterable: true,
                radio: true,
                data: []
            });


    var test = {
        method1: function (data)
        {
            linkgroupid.update({data:data});
        },
        method2: function (data) {
            alerttype.update({data:data});
        },
        method3: function (data) {
            astatus.update({data:data});
        }
    }

    
</script>
</body>
</html>